﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Px = PhysX;

namespace ChimneySim
{
    public class Physics
    {
        Px.Foundation foundation;
        Px.DefaultErrorCallback defaultErrorCallback;
        Px.Physics physics;
        Px.Scene scene;

        public void Init()
        {
            defaultErrorCallback = new Px.DefaultErrorCallback();
            foundation = new Px.Foundation(defaultErrorCallback);
            physics = new Px.Physics(foundation, true);

            Px.SceneDesc desc = new Px.SceneDesc();
            desc.Gravity = new Px.Math.Vector3(0, -9.81f, 0);

            scene = physics.CreateScene(desc);
        }
    }
}
